<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="a" %>
<%@ page import="br.com.seuimovelnamao.Util"%>

<%
String categoria = "Imóveis";
if(Util.hashImoveis.get(request.getAttribute("categoria")) != null)
	categoria = Util.hashImoveis.get(request.getAttribute("categoria"));
%>

<c:import url="/views/includes/header.jsp" />

<div class="container">
	<div class="content content-map">
		
		<div class="bg-double-border">
			<span class="bg-white"><%=categoria %></span>
		</div>
		<c:forEach var="imovel" items="${imoveis}">
			<a:anuncioImovel imovel="${imovel}" />
		</c:forEach>
		
		<div style="clear:both; height:25px;"></div>
		
		<ul>
			<c:forEach var="intencao" items="${intencoes}">
				<li><a href="/<%=request.getAttribute("categoria") %>/${intencao}/"><%=categoria %> ${intencao}</a></li>
			</c:forEach>
		</ul>
		
		<ul>
			<c:forEach var="estado" items="${estados}">
				<li><a href="/<%=request.getAttribute("categoria") %>/${fn:toLowerCase(estado.uf)}/"><%=categoria %> ${estado.nome}</a></li>
			</c:forEach>
		</ul>
		
		<script type="text/javascript">
		// Opacidade da imagem de "ultimos imoveis"
		$(function() {
			$('.ultimos-imoveis img').each(function() {
				$(this).hover(function() {
					$(this).stop().animate({
						opacity : "0.7"
					}, 'slow');
				}, function() {
					$(this).stop().animate({
						opacity : "1"
					}, 'slow');
				});
			});
		});
		</script>

<c:import url="/views/includes/footer.jsp" />